package com.joekai.base_library.http;

import com.joekai.base_library.http.interfaces.IBeanConfig;
import com.joekai.base_library.http.interfaces.IHttpConfig;

/**
 * author:  JoeKai
 * date: 2022/6/30 22:53
 * content：初始化Http相关设置
 */
public class HttpConfigPlugin {
    private volatile static HttpConfigPlugin INSTANCES;
    public IHttpConfig httpConfig;

    public IBeanConfig beanConfig;

    public static HttpConfigPlugin getInstances() {
        if (INSTANCES == null) {
            synchronized (HttpConfigPlugin.class) {
                if (INSTANCES == null) {
                    INSTANCES = new HttpConfigPlugin();
                }
            }
        }
        return INSTANCES;
    }

    public HttpConfigPlugin initHttpConfig(IHttpConfig _httpConfig) {
        this.httpConfig = _httpConfig;
        return this;
    }

    public HttpConfigPlugin initBeanConfig(IBeanConfig _beanConfig) {
        beanConfig = _beanConfig;
        return this;
    }
}
